<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <title>越众棋牌</title>
    <meta name="viewport" content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no,viewport-fit=cover">
    <meta name="full-screen" content="true">
    <!-- uc强制竖屏 -->
    <meta name="screen-orientation" content="portrait">
    <!-- QQ强制竖屏 -->
    <meta name="x5-fullscreen" content="true">
    <!-- xx强制竖屏 -->
    <meta name="360-fullscreen" content="true">
    <!--UC应用模式-->
    <meta name="browsermode" content="application">
    <!-- QQ应用模式 -->
    <meta name="x5-page-mode" content="app">
    <!--"添加到主屏幕“后，全屏显示-->
    <meta name="apple-touch-fullscreen" content="yes">
    <!--iframe里面开启全屏allowfullscreen="true" -->
    <meta name="allowfullscreen" content="true">
    <!--作用就是删除默认的苹果工具栏和菜单栏content有两个值”yes”和”no”,当我们需要显示工具栏和菜单栏时，默认就是显示-->
    <meta name="apple-mobile-web-app-capable" content="no">
    <!--!在iOS中有两个meta值，apple-mobile-web-app-capable和apple-mobile-web-app-status-bar-style，这两个会让网页内容以应用程序风格显示，并使状态栏透明-->
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        html {
            overflow: hidden;
        }
        body {
            -ms-touch-action: none;
            -webkit-user-select: none;
            background: #888888;
            /*padding: 0;
            border: 0;
            margin: 0;*/
            width: 100%;
            height: 100%;
            position: fixed;
            left: 0;
            top: 0;
            /*display: block*/
        }
        #loading {
            -webkit-animation: circle 1s infinite linear;
            /*匀速 循环*/
        }
        @-webkit-keyframes circle {
            0% {
                transform: rotate(0deg);
            }
            100% {
                transform: rotate(360deg);
            }
        }
        @media screen and (orientation: portrait) {
            #loadingDiv,
            #loadingBg {
                transform: rotate(90deg);
                -ms-transform: rotate(90deg);
                -moz-transform: rotate(90deg);
                -webkit-transform: rotate(90deg);
                -o-transform: rotate(90deg);
            }
            #loadingImg {
                width: 100vh;
                height: 100vw;
                top: -100vw;
            }
        }
        @media screen and (orientation: landscape) {
            #loadingDiv,
            #loadingBg {
                transform: rotate(0deg);
                -ms-transform: rotate(0deg);
                -moz-transform: rotate(0deg);
                -webkit-transform: rotate(0deg);
                -o-transform: rotate(0deg);
            }
            #loadingImg {
                width: 100vw;
                height: 100vh;
            }
        }
    </style>
</head>
<script>
    //获取url中参数
    function GetRequest() {
        var url = location.search;
        var theRequest = new Object();
        if (url.indexOf("?") != -1) {
            var str = url.substr(1);
            strs = str.split("&");
            for (var i = 0; i < strs.length; i++) {
                theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
            }
        }
        return theRequest;
    }
    //复制文本到粘贴板
    function copyText(str) {
        var input = document.createElement("input");
        input.value = str;
        document.body.appendChild(input);
        input.select();
        input.setSelectionRange(0, input.value.length), document.execCommand('Copy');
        document.body.removeChild(input);
    }
    //关闭加载动画
    function closeLoad() {
        document.getElementById("loadingBg").remove()
        document.getElementById("loadingDiv").remove()
    }
    //打开日历选择器
    var shurutime = null; //充值界面打开日期选择的回调函数
    function openCalendar(fun) {
        shurutime = fun;
        document.getElementById("Calendar").style.display = "block";
        var now = new Date();
        var year = now.getFullYear(); //得到年份
        var month = now.getMonth() + 1;//得到月份
        if (month < 10) month = "0" + month
        var date = now.getDate();//得到日期
        if (date < 10) date = "0" + date
        var hour = now.getHours();//得到小时
        if (hour < 10) hour = "0" + hour
        var minu = now.getMinutes();//得到分钟
        if (minu < 10) minu = "0" + minu
        document.getElementById("Calendar_date").value = year + "-" + month + "-" + date;
        document.getElementById("Calendar_time").value = hour + ":" + minu;
    }
    function JumpPayUrl(url) {
        window.open(url)
    }
    //关闭日历选择器
    function headCalendar(event) {
        if (event != document.getElementById("conmit")) {
            document.getElementById("Calendar").style.display = "none";
            return;
        }
        var date = document.getElementById("Calendar_date").value;
        var time = document.getElementById("Calendar_time").value;
        if (date && time) {
            document.getElementById("Calendar").style.display = "none";
            game.AddMoneyMediator.returnCalendar = (date + " " + time)
            if (shurutime) {
                shurutime.text = date + " " + time;
            }
        } else {
            alert("请选择正确的时间")
        }
    }
</script>

<body style="text-align:center">
<input type="hidden" value=" " readonly="readonly" style="display:none">
<!--首页加载Load-->
<div id="loadingBg" style="margin: auto; position: absolute;pointer-events:none;">
<img id="loadingImg" style="position: absolute" src="resource/images/loading/login_bg.jpg" />
</div>
<div id="loadingDiv" style="margin: -250px 0 0 -250px;position:absolute;width: 500px;height: 500px;top: 50%;left: 50%;display:block">
<table style="width: 500px;height: 300px;text-align: center;">
<tr>
    <img src="resource/images/loading/loadingBg.png" style="position:absolute; left:50%;margin-left: -54px;top:50%;margin-top: -54px;  z-index:1;" />
<img id="loading" src="resource/images/loading/loadingArrow.png" style="position:absolute; left:50%;margin-left: -54px;top:50%;margin-top: -54px; z-index:2;" />
</tr>
<tr>
    <img id="textPng" src="resource/images/loading/textPng.png" style="position:absolute; left:50%;margin-left: -210px;top:50%; margin-top: 64px;"/>
</tr>
<tr>
    <td>
        <span id="loadingPercentage" style="position:absolute;left:50%;margin-left: -25px; top:50%; margin-top: 117px;color:#ffffff;font-size:20px;text-align: center;"></span>
</td>
</tr>
</table>
</div>
<!--引擎-->
<div style="margin: auto;width: 100%;height: 100%;" class="egret-player" data-entry-class="Main" data-orientation="landscape" data-scale-mode="fixWidth" data-frame-rate="60"
data-multi-fingered="2" data-show-fps="false" data-show-log="false" data-show-fps-style="x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9"
data-content-width="100%" data-content-height="100%">
</div>
<!--日期选择组件-->
<div id="Calendar" style="position:absolute;width: 100%;height: 100%; background-color:rgba(0,0,0,0.4);display:none; z-index:9999">
<div style="position:absolute ;width: 425px; height: 322px; left:50%; top:50%;margin-left: -212px;margin-top:-161px;
  background:url(resource/images/html/cz_shijian_bg.png)">
<input id="Calendar_date" type="date" value="" style="margin-top: 150px"/>
<input id="Calendar_time" type="time" value="" style="margin-top: 150px" />
<br/>
<input id="conmit" type="submit" style="width: 100px;height: 40px;margin-top: 50px" value="确定" onclick="headCalendar(this)"/>
<input id="close" type="submit" style="width: 100px; height: 40px;margin-top: 50px" value="关闭" onclick="headCalendar(this)"/>
</div>
</div>

<!--浏览器不兼容提示-->
<div id="no_canvasTip" style="margin: -150px 0 0 -475px;position:absolute;width: 1080px;height: 300px;top: 50%;left: 50%;display:none">
<p style="color: #ffffff;font-size: 26px;text-align: center;">您的当前浏览器无法打开该游戏！</p>
<p style="color: #ffffff;font-size: 26px;text-align: center;">如果您使用的是IE浏览器，请升级至<span style="color: red">IE10</span>及以上版本。</p>
<p style="color: #ffffff;font-size: 26px;text-align: center;">如果您使用的是QQ浏览器、360浏览器、猎豹浏览器等浏览器，请切换至<span style="color: red">极速模式</span>。</p>
<br>
<p style="color: #ffffff;font-size: 26px;text-align: center;">如果以上方法仍无法解决，请下载<span style="color: red">谷歌浏览器</span>，然后重试！</p>
</div>
<script>
                                                                                                        //讀取腳本進度
                                                                                                        function onLoadMessage(total, current) {
                                                                                                            total = Number(total);
                                                                                                            current = Number(current);
                                                                                                            var msg = document.getElementById('loadingMessage');
                                                                                                            var pr = document.getElementById('loadingPercentage');
                                                                                                            // msg.textContent = "正在进入游戏..."
                                                                                                            // msg.textContent = 1 + " / " + 2 + " 正在加载游戏引擎..."
                                                                                                            pr.textContent = (current * 100 / total).toFixed(0) + "%";
                                                                                                        }
                                                                                                        var loadScript = function (list, callback) {
                                                                                                            var loaded = 0;
                                                                                                            var loadNext = function () {
                                                                                                                loadSingleScript(list[loaded], function () {
                                                                                                                    loaded++;
                                                                                                                    onLoadMessage(list.length, loaded);
                                                                                                                    if (loaded >= list.length) {
                                                                                                                        callback();
                                                                                                                    }
                                                                                                                    else {
                                                                                                                        loadNext();
                                                                                                                    }
                                                                                                                })
                                                                                                            };
                                                                                                            loadNext();
                                                                                                        };
                                                                                                        var loadSingleScript = function (src, callback) {
                                                                                                            var s = document.createElement('script');
                                                                                                            s.async = false;
                                                                                                            s.src = src;
                                                                                                            s.addEventListener('load', function () {
                                                                                                                s.parentNode.removeChild(s);
                                                                                                                s.removeEventListener('load', arguments.callee, false);
                                                                                                                callback();
                                                                                                            }, false);
                                                                                                            document.body.appendChild(s);
                                                                                                        };
                                                                                                        /**判断浏览器是否支持canvas**/
                                                                                                        try {
                                                                                                            document.createElement('canvas').getContext('2d');
                                                                                                        } catch (e) {
                                                                                                            document.getElementById("no_canvasTip").style.display = "block";
                                                                                                        }
                                                                                                        var xhr = new XMLHttpRequest();
                                                                                                        xhr.open('GET', './manifest.json?v=' + Math.random(), true);
                                                                                                        xhr.addEventListener("load", function () {
                                                                                                            var manifest = JSON.parse(xhr.response);
                                                                                                            var list = manifest.initial.concat(manifest.game);
                                                                                                            loadScript(list, function () {

                                                                                                                /**
                                                                                                                 * {
                                                                                                                 * "renderMode":, //Engine rendering mode, "canvas" or "webgl"
                                                                                                                 * "audioType": 0 //Use the audio type, 0: default, 2: web audio, 3: audio
                                                                                                                 * "antialias": //Whether the anti-aliasing is enabled in WebGL mode, true: on, false: off, defaults to false
                                                                                                                 * "calculateCanvasScaleFactor": //a function return canvas scale factor
                                                                                                                 * }
                                                                                                                 **/
                                                                                                                egret.runEgret({
                                                                                                                    renderMode: "webgl", audioType: 0, calculateCanvasScaleFactor: function (context) {
                                                                                                                        var backingStore = context.backingStorePixelRatio ||
                                                                                                                            context.webkitBackingStorePixelRatio ||
                                                                                                                            context.mozBackingStorePixelRatio ||
                                                                                                                            context.msBackingStorePixelRatio ||
                                                                                                                            context.oBackingStorePixelRatio ||
                                                                                                                            context.backingStorePixelRatio || 1;
                                                                                                                        return (window.devicePixelRatio || 1) / backingStore;
                                                                                                                    }
                                                                                                                });
                                                                                                            });
                                                                                                        });
                                                                                                        xhr.send(null);
                                                                                                        //禁用鼠标右键
                                                                                                        document.oncontextmenu = function () { return false; }
</script>
</body>

</html>